<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; img-src 'self' data:">
    <link rel="stylesheet" href="../css/load.css">
</head>
<body>
    <div class="aura">
        <div class="aura-content">
            <img id="logo" width='192'/>
            <h1>WebCord</h1>
            <p id="motd"></p>
        </div>
    </div>
    <script>
        document.language = navigator.language
        void fetch(new Request('../json/motd.json')).then((response) => {
            if (!response.ok) throw new Error("Response error: ${response.status}")
            return response.json();
        }).then((motd) => {
            const motdLocal = motd[navigator.language] ?? motd.en
            const element = document.getElementById('motd');
            element.innerHTML = motdLocal[Math.floor(Math.random() * motdLocal.length)];
        });
    </script>
</body>
</html>